package jmine.tec.di.injector.impl;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import jmine.tec.annotations.Unmodifiable;
import jmine.tec.di.injector.DependencyInjector;
import jmine.tec.di.injector.Injector;
import jmine.tec.di.scope.TypedScope;

/**
 * @author takeshi.fukushima
 */
@Unmodifiable
public final class DoNothingInjector implements DependencyInjector, Serializable {

    private static final long serialVersionUID = 8909927064432706075L;

    private static final DoNothingInjector INSTANCE = new DoNothingInjector();

    /**
     */
    private DoNothingInjector() {
    }

    /**
     * @return {@link DoNothingInjector}
     */
    public static DoNothingInjector getInstance() {
        return INSTANCE;
    }

    /**
     * {@inheritDoc}
     */
    public Injector[] getAllInjectors() {
        return new Injector[0];
    }

    /**
     * {@inheritDoc}
     */
    public void inject(Object target, TypedScope properties) {
    }

    /**
     * {@inheritDoc}
     */
    public List<String> validateRequiredProperties(TypedScope scope) {
        return new ArrayList<String>();
    }

    /**
     * Sobrescreve o mecanismo de desserializacao
     * 
     * @return Object
     */
    protected Object readResolve() {
        return INSTANCE;
    }
}
